package com.learn.boot;

import com.learn.pojo.RPCConsumer;
import com.learn.pojo.RpcRequest;
import com.learn.service.IUserService;

public class ConsumerBoot {

    public static void main(String[] args) throws InterruptedException {

        //1.创建代理对象
        IUserService service = (IUserService) RPCConsumer.createProxy(IUserService.class);

        //2.循环给服务器写数据
        while (true) {
            RpcRequest rpcRequest = new RpcRequest();
            String result = service.sayHello(rpcRequest);
            System.out.println(result);
        }

    }
}
